/**
 * 任务过滤与搜索组件样式
 */

.gantt-task-filter {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 16px;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  font-family: var(--font-family);
  font-size: 14px;
}

.filter-search {
  margin-bottom: var(--spacing-md);
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  transition: all 0.3s;
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
  outline: none;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-gray-200);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-weight: 600;
  color: var(--color-gray-700);
  font-size: 13px;
}

.filter-group select {
  padding: 6px 10px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--border-radius-sm);
  background-color: #fff;
  transition: all 0.3s;
}

.filter-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.1);
  outline: none;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-range input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
}

.date-range input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.1);
  outline: none;
}

.date-range span {
  color: var(--color-gray-500);
  font-size: 12px;
}

.reset-button {
  padding: 8px 14px;
  background-color: var(--color-gray-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--border-radius-sm);
  color: var(--color-gray-600);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  align-self: flex-end;
}

.reset-button:hover {
  background-color: var(--color-gray-200);
  border-color: var(--color-gray-400);
  color: var(--color-gray-800);
}

.filter-results {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
  padding-right: 4px;
}

.filter-results::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.filter-results::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 3px;
}

.filter-results::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 3px;
}

.filter-results::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

.filter-results h4 {
  margin: 0 0 12px 0;
  color: var(--color-gray-800);
  font-size: 14px;
  font-weight: 600;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-item {
  position: relative;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  background-color: var(--color-gray-50);
  margin-bottom: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid var(--color-gray-200);
}

.task-item:hover {
  background-color: #e0e7ff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary-light);
}

.task-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: var(--color-success);
  transition: width 0.3s;
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.task-name {
  font-weight: 600;
  color: var(--color-gray-800);
}

.task-dates {
  font-size: 12px;
  color: var(--color-gray-600);
}

.task-type {
  position: absolute;
  right: 8px;
  top: 8px;
}

.milestone-badge, .project-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  color: white;
  font-weight: 500;
}

.milestone-badge {
  background-color: var(--color-info);
}

.project-badge {
  background-color: var(--color-warning);
}

.no-results {
  padding: 16px;
  text-align: center;
  color: var(--color-gray-500);
  font-style: italic;
} 